function doGet(url, successFunction) {
    let count = getCharCount(url, '/');
    if (count === 2) {
        let index = url.lastIndexOf("\/");
        let key = url.substr(index + 1, url.length);

        let url2 = url.substr(0, index);
        let file = url2.substr(url2.lastIndexOf("\/") + 1, url2.length);
        Log.debug("模拟数据的key:" + key + '  file:' + file);
        let indexQuestion =key.indexOf('?');
        let column = undefined;
        if(indexQuestion != -1) {
            column = key.substring(indexQuestion + 1, key.length);
            key = key.substring(0, indexQuestion);
        }
        $.getJSON('/basic/js/mock/' + file + '.json', data => {
            if(column === undefined) {
                successFunction(data[key]);
            }else {
                successFunction(data[key][column]);
            }
        })
    } else if (count === 1) {
        let index = url.lastIndexOf("\/");
        let file = url.substr(index + 1, url.length);
        $.getJSON('/basic/js/mock/' + file + '.json', data => {
            successFunction(data);
        })
    }


    function getCharCount(str, char) {
        let regex = new RegExp(char, 'g'); // 使用g表示整个字符串都要匹配
        let result = str.match(regex);          //match方法可在字符串内检索指定的值，或找到一个或多个正则表达式的匹配。
        let count = !result ? 0 : result.length;
        return count;
    }
}
